﻿using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace QDP.Contracts
{
    /// <summary>表示一个数据服务图层对象。</summary>
    [DataContract]
    public class MapServiceLayerBase
    {
        public MapServiceLayerBase()
        {
            SubNotes = new List<MapServiceLayerBase>();
        }
        /// <summary>服务类型</summary>
        [DataMember]
        [XmlAttribute]
        public string Type { get; set; }
        /// <summary>获取或设置数据服务编码，唯一标识。</summary>
        [DataMember]
        [XmlAttribute]
        public string Code { get; set; }
        /// <summary>获取或设置组件的标题。</summary>
        [DataMember]
        [XmlAttribute]
        public string Caption { get; set; }
        /// <summary>获取或设置数据服务目录的子节点集合。</summary>
        [DataMember]
        //[XmlArrayItem("ArcGISImage", typeof(GSArcGISImageMapServiceLayer))
        //, XmlArrayItem("ArcGISTiled", typeof(GSArcGISTiledMapServiceLayer))
        //, XmlArrayItem("ArcGISDynamic", typeof(GSArcGISDynamicMapServiceLayer))
        //, XmlArrayItem("ArcGISFeature", typeof(GSArcGISFeatureLayer))
        //, XmlArrayItem("TiDiTu", typeof(GSTiDiTuMapServiceLayer))]
        public List<MapServiceLayerBase> SubNotes { get; set; }
        /// <summary>获取或设置数据服务认证字符串。</summary>
        [DataMember]
        [XmlAttribute]
        public string Token { get; set; }
        /// <summary>获取或设置数据服务的提示信息。</summary>
        [DataMember]
        [XmlAttribute]
        public string Description { get; set; }
        /// <summary>获取或设置数据服务的参数表达式。</summary>
        [DataMember]
        [XmlAttribute]
        public string ParmsExpression { get; set; }
        /// <summary>获取或设置数据服务的关键字</summary>
        [DataMember]
        [XmlAttribute]
        public string Tags { get; set; }
        /// <summary>获取或设置服务地址</summary>
        [DataMember]
        [XmlAttribute]
        public string Url { get; set; }
        /// <summary>获取或设置数据服务的图标（大）</summary>
        [DataMember]
        [XmlAttribute]
        public string ImageUrl1 { get; set; }
        /// <summary>获取或设置数据服务的图标（中）</summary>
        [DataMember]
        [XmlAttribute]
        public string ImageUrl2 { get; set; }
        /// <summary>获取或设置数据服务的图标（小）</summary>
        [DataMember]
        [XmlAttribute]
        public string ImageUrl3 { get; set; }
        /// <summary>获取或设置数据服务前景色</summary>
        [DataMember]
        [XmlAttribute]
        public string Foreground { get; set; }
        /// <summary>获取或设置数据服务背景色</summary>
        [DataMember]
        [XmlAttribute]
        public string Background { get; set; }
    }
}